﻿using RpcClient.Interface;
using RpcHelper.Config;

namespace RpcSync.Service.ConfigService
{
    internal class ConfigExtendService : IExtendService
    {
        public string Name => "RpcSyncConfig";

        public void Load(IRpcService service)
        {
            service.BeginIniting += this.Service_BeginIniting;
        }

        private void Service_BeginIniting()
        {
            LocalConfig.Local.SetConfig("rpc_config:IsEnableError", "false", int.MaxValue);
            RpcClient.RpcClient.Config.SetLocalServer(new ConfigServer());
        }
    }
}
